/*
 * ExtentSort.h
 *
 *  Created on: Dec 18, 2011
 *      Author: Gal
 */

#ifndef EXTENTSORT_H_
#define EXTENTSORT_H_

#include "ExtentSumStatistics.h"
#include "SystemView.h"
#include <set>
#include <map>
#include <string>


class ExtentSort{
public:
	ExtentSumStatistics* sortedExtents[2840];	// should be the map's size
	int min;

	ExtentSort();
	virtual ~ExtentSort();
	void setAdd(ExtentSumStatistics* ess);
	void create(SystemView* sys);
	map<string, int> compare(SystemView* sys);

	void merge(int,int,int);
	void merge_sort(int low,int high);

};
#endif /* EXTENTSORT_H_ */
